﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MaxLeaf.Platform.DataContract;
using CommonsLib.DB;
using MaxLeaf.Platform.DALImplementation;
using MaxLeaf.Platform.Functions;
using CommonsLib.Utility;
using MaxLeaf.Platform.Commons;

namespace MaxLeaf.Platform.BLLImplementation
{
    public class imOthersInputDtlBLL:BaseBLL
    {
        


        public override string FinterIDFields
        {
            get
            {
                return string.Format("{0},{1}", "DtlID", (int)FinterIDType.OthersInputDtl);
            }
        }


        internal void SetRecvDtlId(DBAccess dbcon, int intKey, int intRecvHdrID, int intRecvDtlID)
        {
            ((imOthersInputDtlDAL)this.CurrentDAL).SetRecvDtlId(dbcon, intKey, intRecvHdrID, intRecvDtlID);
        }

        internal void SetPosted(DBAccess dbcon, int intKey)
        {
            ((imOthersInputDtlDAL)this.CurrentDAL).SetPosted(dbcon, intKey);
        }

        internal List<int> GetUnpostKeys(int intOthersInputHdrID)
        {
            using (DBAccess dbcon = DataFunc.GetDBAccessByDataModelType(typeof(imOthersInputDtlDataModel)))
            {
                return ((imOthersInputDtlDAL)this.CurrentDAL).GetUnpostKeys(dbcon,intOthersInputHdrID);
            }
        }

        internal void SetUnRecv(DBAccess dbcon, int intKey)
        {
            ((imOthersInputDtlDAL)this.CurrentDAL).SetUnRecv(dbcon, intKey);
        }

        internal void GetRecvData(DBAccess dbConOrder, int intKey, out int intRecvHdrId, out int intRecvDtlId, out double dblRecvQty)
        {
             ((imOthersInputDtlDAL)this.CurrentDAL).GetRecvData(  dbConOrder,   intKey, out   intRecvHdrId, out   intRecvDtlId, out   dblRecvQty);
        }

        
    }
}
